package com.demo.edit.config;

import com.demo.edit.util.RedisManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RedisConfig {

    @Bean
    public RedisManager redisManager(ServerConfig serverConfig) {
        RedisManager redisManager = new RedisManager();
        redisManager.init(serverConfig.getRedisHost(), serverConfig.getRedisPort(), 2000, serverConfig.getRedisPassword());
        return redisManager;
    }
}
